home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
t3_1
/
xlib.lha
/
xlib
/
#xws6.t#
< prev
next >
Wrap
Text File
|
1990-06-01
|
48KB
|
1,096 lines
(HERALD XWS6 (ENV TSYS (XLIB INTERFACE)))
(DEFINE-FOREIGN XCLEARWINDOW*
("XClearWindow" (IN REP/C-POINTER) (IN REP/INTEGER))
IGNORE)
(DEFINE (XCLEARWINDOW DPY W)
(LET* ((DPY (CHK-DISPLAYP DPY))
(W W)
(RETURN-VALUE (BLOCK (XCLEARWINDOW* DPY W) '())))
RETURN-VALUE))
(DEFINE-FOREIGN XCLEARAREA*
("XClearArea" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XCLEARAREA DPY W X Y WIDTH HEIGHT EXPOSURES)
(LET* ((DPY (CHK-DISPLAYP DPY))
(W W)
(X X)
(Y Y)
(WIDTH WIDTH)
(HEIGHT HEIGHT)
(EXPOSURES EXPOSURES)
(RETURN-VALUE (BLOCK (XCLEARAREA* DPY
W
X
Y
WIDTH
HEIGHT
EXPOSURES)
'())))
RETURN-VALUE))
(DEFINE-FOREIGN XCOPYAREA*
("XCopyArea" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XCOPYAREA DPY
SRC_DRAWABLE
DST_DRAWABLE
GC
SRC_X
SRC_Y
WIDTH
HEIGHT
DST_X
DST_Y)
(LET* ((DPY (CHK-DISPLAYP DPY))
(SRC_DRAWABLE SRC_DRAWABLE)
(DST_DRAWABLE DST_DRAWABLE)
(GC (CHK-GC GC))
(SRC_X SRC_X)
(SRC_Y SRC_Y)
(WIDTH WIDTH)
(HEIGHT HEIGHT)
(DST_X DST_X)
(DST_Y DST_Y)
(RETURN-VALUE (BLOCK (XCOPYAREA* DPY
SRC_DRAWABLE
DST_DRAWABLE
GC
SRC_X
SRC_Y
WIDTH
HEIGHT
DST_X
DST_Y)
'())))
RETURN-VALUE))
(DEFINE-FOREIGN XCOPYPLANE*
("XCopyPlane" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XCOPYPLANE DPY
SRC_DRAWABLE
DST_DRAWABLE
GC
SRC_X
SRC_Y
WIDTH
HEIGHT
DST_X
DST_Y
BIT_PLANE)
(LET* ((DPY (CHK-DISPLAYP DPY))
(SRC_DRAWABLE SRC_DRAWABLE)
(DST_DRAWABLE DST_DRAWABLE)
(GC (CHK-GC GC))
(SRC_X SRC_X)
(SRC_Y SRC_Y)
(WIDTH WIDTH)
(HEIGHT HEIGHT)
(DST_X DST_X)
(DST_Y DST_Y)
(BIT_PLANE BIT_PLANE)
(RETURN-VALUE (BLOCK (XCOPYPLANE* DPY
SRC_DRAWABLE
DST_DRAWABLE
GC
SRC_X
SRC_Y
WIDTH
HEIGHT
DST_X
DST_Y
BIT_PLANE)
'())))
RETURN-VALUE))
(DEFINE-FOREIGN XDRAWPOINT*
("XDrawPoint" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XDRAWPOINT DPY D GC X Y)
(LET* ((DPY (CHK-DISPLAYP DPY))
(D D)
(GC (CHK-GC GC))
(X X)
(Y Y)
(RETURN-VALUE (BLOCK (XDRAWPOINT* DPY D GC X Y) '())))
RETURN-VALUE))
(DEFINE-FOREIGN XDRAWPOINTS*
("XDrawPoints" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XDRAWPOINTS DPY D GC POINTS N_POINTS MODE)
(LET* ((DPY (CHK-DISPLAYP DPY))
(D D)
(GC (CHK-GC GC))
(POINTS (CHK-XPOINTAP POINTS))
(N_POINTS N_POINTS)
(MODE MODE)
(RETURN-VALUE (BLOCK (XDRAWPOINTS* DPY D GC POINTS N_POINTS MODE)
'())))
RETURN-VALUE))
(DEFINE-FOREIGN XDRAWLINE*
("XDrawLine" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XDRAWLINE DPY D GC X1 Y1 X2 Y2)
(LET* ((DPY (CHK-DISPLAYP DPY))
(D D)
(GC (CHK-GC GC))
(X1 X1)
(Y1 Y1)
(X2 X2)
(Y2 Y2)
(RETURN-VALUE (BLOCK (XDRAWLINE* DPY D GC X1 Y1 X2 Y2)
'())))
RETURN-VALUE))
(DEFINE-FOREIGN XDRAWLINES*
("XDrawLines" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XDRAWLINES DPY D GC POINTS NPOINTS MODE)
(LET* ((DPY (CHK-DISPLAYP DPY))
(D D)
(GC (CHK-GC GC))
(POINTS (CHK-XPOINTAP POINTS))
(NPOINTS NPOINTS)
(MODE MODE)
(RETURN-VALUE (BLOCK (XDRAWLINES* DPY D GC POINTS NPOINTS MODE)
'())))
RETURN-VALUE))
(DEFINE-FOREIGN XDRAWSEGMENTS*
("XDrawSegments" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/C-POINTER)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XDRAWSEGMENTS DPY D GC SEGMENTS NSEGMENTS)
(LET* ((DPY (CHK-DISPLAYP DPY))
(D D)
(GC (CHK-GC GC))
(SEGMENTS (CHK-XSEGMENTAP SEGMENTS))
(NSEGMENTS NSEGMENTS)
(RETURN-VALUE (BLOCK (XDRAWSEGMENTS* DPY D GC SEGMENTS NSEGMENTS)
'())))
RETURN-VALUE))
(DEFINE-FOREIGN XDRAWRECTANGLE*
("XDrawRectangle" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XDRAWRECTANGLE DPY D GC X Y WIDTH HEIGHT)
(LET* ((DPY (CHK-DISPLAYP DPY))
(D D)
(GC (CHK-GC GC))
(X X)
(Y Y)
(WIDTH WIDTH)
(HEIGHT HEIGHT)
(RETURN-VALUE (BLOCK (XDRAWRECTANGLE* DPY D GC X Y WIDTH HEIGHT)
'())))
RETURN-VALUE))
(DEFINE-FOREIGN XDRAWRECTANGLES*
("XDrawRectangles" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/C-POINTER)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XDRAWRECTANGLES DPY D GC RECTS N_RECTS)
(LET* ((DPY (CHK-DISPLAYP DPY))
(D D)
(GC (CHK-GC GC))
(RECTS (CHK-XRECTANGLEAP RECTS))
(N_RECTS N_RECTS)
(RETURN-VALUE (BLOCK (XDRAWRECTANGLES* DPY D GC RECTS N_RECTS)
'())))
RETURN-VALUE))
(DEFINE-FOREIGN XDRAWARC*
("XDrawArc" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XDRAWARC DPY D GC X Y WIDTH HEIGHT ANGLE1 ANGLE2)
(LET* ((DPY (CHK-DISPLAYP DPY))
(D D)
(GC (CHK-GC GC))
(X X)
(Y Y)
(WIDTH WIDTH)
(HEIGHT HEIGHT)
(ANGLE1 ANGLE1)
(ANGLE2 ANGLE2)
(RETURN-VALUE (BLOCK (XDRAWARC* DPY
D
GC
X
Y
WIDTH
HEIGHT
ANGLE1
ANGLE2)
'())))
RETURN-VALUE))
(DEFINE-FOREIGN XDRAWARCS*
("XDrawArcs" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/C-POINTER)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XDRAWARCS DPY D GC ARCS N_ARCS)
(LET* ((DPY (CHK-DISPLAYP DPY))
(D D)
(GC (CHK-GC GC))
(ARCS (CHK-XARCAP ARCS))
(N_ARCS N_ARCS)
(RETURN-VALUE (BLOCK (XDRAWARCS* DPY D GC ARCS N_ARCS)
'())))
RETURN-VALUE))
(DEFINE-FOREIGN XFILLRECTANGLE*
("XFillRectangle" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XFILLRECTANGLE DPY D GC X Y WIDTH HEIGHT)
(LET* ((DPY (CHK-DISPLAYP DPY))
(D D)
(GC (CHK-GC GC))
(X X)
(Y Y)
(WIDTH WIDTH)
(HEIGHT HEIGHT)
(RETURN-VALUE (BLOCK (XFILLRECTANGLE* DPY D GC X Y WIDTH HEIGHT)
'())))
RETURN-VALUE))
(DEFINE-FOREIGN XFILLRECTANGLES*
("XFillRectangles" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/C-POINTER)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XFILLRECTANGLES DPY D GC RECTANGLES N_RECTS)
(LET* ((DPY (CHK-DISPLAYP DPY))
(D D)
(GC (CHK-GC GC))
(RECTANGLES (CHK-XRECTANGLEAP RECTANGLES))
(N_RECTS N_RECTS)
(RETURN-VALUE (BLOCK (XFILLRECTANGLES* DPY
D
GC
RECTANGLES
N_RECTS)
'())))
RETURN-VALUE))
(DEFINE-FOREIGN XFILLPOLYGON*
("XFillPolygon" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XFILLPOLYGON DPY D GC POINTS N_POINTS SHAPE MODE)
(LET* ((DPY (CHK-DISPLAYP DPY))
(D D)
(GC (CHK-GC GC))
(POINTS (CHK-XPOINTAP POINTS))
(N_POINTS N_POINTS)
(SHAPE SHAPE)
(MODE MODE)
(RETURN-VALUE (BLOCK (XFILLPOLYGON* DPY
D
GC
POINTS
N_POINTS
SHAPE
MODE)
'())))
RETURN-VALUE))
(DEFINE-FOREIGN XFILLARC*
("XFillArc" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XFILLARC DPY D GC X Y WIDTH HEIGHT ANGLE1 ANGLE2)
(LET* ((DPY (CHK-DISPLAYP DPY))
(D D)
(GC (CHK-GC GC))
(X X)
(Y Y)
(WIDTH WIDTH)
(HEIGHT HEIGHT)
(ANGLE1 ANGLE1)
(ANGLE2 ANGLE2)
(RETURN-VALUE (BLOCK (XFILLARC* DPY
D
GC
X
Y
WIDTH
HEIGHT
ANGLE1
ANGLE2)
'())))
RETURN-VALUE))
(DEFINE-FOREIGN XFILLARCS*
("XFillArcs" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/C-POINTER)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XFILLARCS DPY D GC ARCS N_ARCS)
(LET* ((DPY (CHK-DISPLAYP DPY))
(D D)
(GC (CHK-GC GC))
(ARCS (CHK-XARCAP ARCS))
(N_ARCS N_ARCS)
(RETURN-VALUE (BLOCK (XFILLARCS* DPY D GC ARCS N_ARCS)
'())))
RETURN-VALUE))
(DEFINE-FOREIGN XLOADFONT*
("XLoadFont" (IN REP/C-POINTER) (IN REP/STRING))
REP/INTEGER)
(DEFINE (XLOADFONT DPY NAME)
(LET* ((DPY (CHK-DISPLAYP DPY))
(NAME (IF (STRING? NAME)
(STRING->ASCIZ! NAME)
(ERROR "Argument is incorrect type: ~s" NAME)))
(RETURN-VALUE (XLOADFONT* DPY NAME)))
RETURN-VALUE))
(DEFINE-FOREIGN XQUERYFONT*
("XQueryFont" (IN REP/C-POINTER) (IN REP/INTEGER))
REP/C-POINTER)
(DEFINE (XQUERYFONT DPY FID)
(LET* ((DPY (CHK-DISPLAYP DPY))
(FID FID)
(RETURN-VALUE (CONS 'XFONTSTRUCTP (XQUERYFONT* DPY FID))))
RETURN-VALUE))
(DEFINE-FOREIGN XLOADQUERYFONT*
("XLoadQueryFont" (IN REP/C-POINTER) (IN REP/STRING))
REP/C-POINTER)
(DEFINE (XLOADQUERYFONT DPY NAME)
(LET* ((DPY (CHK-DISPLAYP DPY))
(NAME (IF (STRING? NAME)
(STRING->ASCIZ! NAME)
(ERROR "Argument is incorrect type: ~s" NAME)))
(RETURN-VALUE (CONS 'XFONTSTRUCTP
(XLOADQUERYFONT* DPY NAME))))
RETURN-VALUE))
(DEFINE-FOREIGN XFREEFONT*
("XFreeFont" (IN REP/C-POINTER) (IN REP/C-POINTER))
IGNORE)
(DEFINE (XFREEFONT DPY FS)
(LET* ((DPY (CHK-DISPLAYP DPY))
(FS (CHK-XFONTSTRUCTP FS))
(RETURN-VALUE (BLOCK (XFREEFONT* DPY FS) '())))
RETURN-VALUE))
(DEFINE-FOREIGN XGETFONTPROPERTY*
("XGetFontProperty" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/EXTEND))
REP/INTEGER)
(DEFINE (XGETFONTPROPERTY FS NAME)
(LET* ((FS (CHK-XFONTSTRUCTP FS))
(NAME NAME)
(VALUEPTR (MAKE-BYTEV 4))
(RETURN-VALUE (XGETFONTPROPERTY* FS NAME VALUEPTR)))
(RETURN RETURN-VALUE (MREF-INTEGER VALUEPTR 0))))
(DEFINE-FOREIGN XUNLOADFONT*
("XUnloadFont" (IN REP/C-POINTER) (IN REP/INTEGER))
IGNORE)
(DEFINE (XUNLOADFONT DPY FONT)
(LET* ((DPY (CHK-DISPLAYP DPY))
(FONT FONT)
(RETURN-VALUE (BLOCK (XUNLOADFONT* DPY FONT) '())))
RETURN-VALUE))
(DEFINE-FOREIGN XLISTFONTS*
("XListFonts" (IN REP/C-POINTER)
(IN REP/STRING)
(IN REP/INTEGER)
(IN REP/EXTEND))
REP/C-POINTER)
(DEFINE (XLISTFONTS DPY PATTERN MAXNAMES)
(LET* ((DPY (CHK-DISPLAYP DPY))
(PATTERN (IF (STRING? PATTERN)
(STRING->ASCIZ! PATTERN)
(ERROR "Argument is incorrect type: ~s" PATTERN)))
(MAXNAMES MAXNAMES)
(ACTUAL_COUNT (MAKE-BYTEV 4))
(RETURN-VALUE (CONS 'CHARPAP
(XLISTFONTS* DPY
PATTERN
MAXNAMES
ACTUAL_COUNT))))
(RETURN RETURN-VALUE (MREF-INTEGER ACTUAL_COUNT 0))))
(DEFINE-FOREIGN XFREEFONTNAMES* ("XFreeFontNames" (IN REP/C-POINTER)) IGNORE)
(DEFINE (XFREEFONTNAMES LIST)
(LET* ((LIST (CHK-CHARPAP LIST))
(RETURN-VALUE (BLOCK (XFREEFONTNAMES* LIST) '())))
RETURN-VALUE))
(DEFINE-FOREIGN XLISTFONTSWITHINFO*
("XListFontsWithInfo" (IN REP/C-POINTER)
(IN REP/STRING)
(IN REP/INTEGER)
(IN REP/EXTEND)
(IN REP/EXTEND))
REP/C-POINTER)
(DEFINE (XLISTFONTSWITHINFO DPY PATTERN MAXNAMES)
(LET* ((DPY (CHK-DISPLAYP DPY))
(PATTERN (IF (STRING? PATTERN)
(STRING->ASCIZ! PATTERN)
(ERROR "Argument is incorrect type: ~s" PATTERN)))
(MAXNAMES MAXNAMES)
(ACTUAL_COUNT (MAKE-BYTEV 4))
(INFO (MAKE-BYTEV 4))
(RETURN-VALUE (CONS 'CHARPAP
(XLISTFONTSWITHINFO* DPY
PATTERN
MAXNAMES
ACTUAL_COUNT
INFO))))
(RETURN RETURN-VALUE
(MREF-INTEGER ACTUAL_COUNT 0)
(CONS 'XFONTSTRUCTAP (MREF-POINTER INFO 0)))))
(DEFINE-FOREIGN XFREEFONTINFO*
("XFreeFontInfo" (IN REP/C-POINTER)
(IN REP/C-POINTER)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XFREEFONTINFO NAMES INFO COUNT)
(LET* ((NAMES (CHK-CHARPAP NAMES))
(INFO (CHK-XFONTSTRUCTAP INFO))
(COUNT COUNT)
(RETURN-VALUE (BLOCK (XFREEFONTINFO* NAMES INFO COUNT)
'())))
RETURN-VALUE))
(DEFINE-FOREIGN XSETFONTPATH*
("XSetFontPath" (IN REP/C-POINTER)
(IN REP/C-POINTER)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XSETFONTPATH DPY DIRECTORIES NDIRS)
(LET* ((DPY (CHK-DISPLAYP DPY))
(DIRECTORIES (CHK-CHARPAP DIRECTORIES))
(NDIRS NDIRS)
(RETURN-VALUE (BLOCK (XSETFONTPATH* DPY DIRECTORIES NDIRS)
'())))
RETURN-VALUE))
(DEFINE-FOREIGN XGETFONTPATH*
("XGetFontPath" (IN REP/C-POINTER) (IN REP/INTEGER))
REP/C-POINTER)
(DEFINE (XGETFONTPATH DPY NPATHS)
(LET* ((DPY (CHK-DISPLAYP DPY))
(NPATHS NPATHS)
(RETURN-VALUE (CONS 'CHARPAP (XGETFONTPATH* DPY NPATHS))))
RETURN-VALUE))
(DEFINE-FOREIGN XFREEFONTPATH*
("XFreeFontPath" (IN REP/C-POINTER))
REP/C-POINTER)
(DEFINE (XFREEFONTPATH LIST)
(LET* ((LIST (CHK-CHARPAP LIST))
(RETURN-VALUE (CONS 'CHARPAP (XFREEFONTPATH* LIST))))
RETURN-VALUE))
(DEFINE-FOREIGN XTEXTWIDTH*
("XTextWidth" (IN REP/C-POINTER)
(IN REP/STRING)
(IN REP/INTEGER))
REP/INTEGER)
(DEFINE (XTEXTWIDTH FONTSTRUCT STRING COUNT)
(LET* ((FONTSTRUCT (CHK-XFONTSTRUCTP FONTSTRUCT))
(STRING (IF (STRING? STRING)
(STRING->ASCIZ! STRING)
(ERROR "Argument is incorrect type: ~s" STRING)))
(COUNT COUNT)
(RETURN-VALUE (XTEXTWIDTH* FONTSTRUCT STRING COUNT)))
RETURN-VALUE))
(DEFINE-FOREIGN XTEXTWIDTH16*
("XTextWidth16" (IN REP/C-POINTER)
(IN REP/C-POINTER)
(IN REP/INTEGER))
REP/INTEGER)
(DEFINE (XTEXTWIDTH16 FONTSTRUCT STRING COUNT)
(LET* ((FONTSTRUCT (CHK-XFONTSTRUCTP FONTSTRUCT))
(STRING (CHK-XCHAR2BAP STRING))
(COUNT COUNT)
(RETURN-VALUE (XTEXTWIDTH16* FONTSTRUCT STRING COUNT)))
RETURN-VALUE))
(DEFINE-FOREIGN XTEXTEXTENTS*
("XTextExtents" (IN REP/C-POINTER)
(IN REP/STRING)
(IN REP/INTEGER)
(IN REP/EXTEND)
(IN REP/EXTEND)
(IN REP/EXTEND)
(IN REP/EXTEND))
IGNORE)
(DEFINE (XTEXTEXTENTS FONTSTRUCT STRING NCHARS)
(LET* ((FONTSTRUCT (CHK-XFONTSTRUCTP FONTSTRUCT))
(STRING (IF (STRING? STRING)
(STRING->ASCIZ! STRING)
(ERROR "Argument is incorrect type: ~s" STRING)))
(NCHARS NCHARS)
(DIR (MAKE-BYTEV 4))
(FONT_ASCENT (MAKE-BYTEV 4))
(FONT_DESCENT (MAKE-BYTEV 4))
(OVERALL (MAKE-BYTEV 12))
(RETURN-VALUE (BLOCK (XTEXTEXTENTS* FONTSTRUCT
STRING
NCHARS
DIR
FONT_ASCENT
FONT_DESCENT
OVERALL)
'())))
(RETURN (MREF-INTEGER DIR 0)
(MREF-INTEGER FONT_ASCENT 0)
(MREF-INTEGER FONT_DESCENT 0)
(CONS 'XCHARSTRUCTP OVERALL))))
(DEFINE-FOREIGN XTEXTEXTENTS16*
("XTextExtents16" (IN REP/C-POINTER)
(IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/EXTEND)
(IN REP/EXTEND)
(IN REP/EXTEND)
(IN REP/EXTEND))
IGNORE)
(DEFINE (XTEXTEXTENTS16 FONTSTRUCT STRING NCHARS)
(LET* ((FONTSTRUCT (CHK-XFONTSTRUCTP FONTSTRUCT))
(STRING (CHK-XCHAR2BAP STRING))
(NCHARS NCHARS)
(DIR (MAKE-BYTEV 4))
(FONT_ASCENT (MAKE-BYTEV 4))
(FONT_DESCENT (MAKE-BYTEV 4))
(OVERALL (MAKE-BYTEV 12))
(RETURN-VALUE (BLOCK (XTEXTEXTENTS16* FONTSTRUCT
STRING
NCHARS
DIR
FONT_ASCENT
FONT_DESCENT
OVERALL)
'())))
(RETURN (MREF-INTEGER DIR 0)
(MREF-INTEGER FONT_ASCENT 0)
(MREF-INTEGER FONT_DESCENT 0)
(CONS 'XCHARSTRUCTP OVERALL))))
(DEFINE-FOREIGN XQUERYTEXTEXTENTS*
("XQueryTextExtents" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/STRING)
(IN REP/INTEGER)
(IN REP/EXTEND)
(IN REP/EXTEND)
(IN REP/EXTEND)
(IN REP/EXTEND))
IGNORE)
(DEFINE (XQUERYTEXTEXTENTS DPY FID STRING NCHARS)
(LET* ((DPY (CHK-DISPLAYP DPY))
(FID FID)
(STRING (IF (STRING? STRING)
(STRING->ASCIZ! STRING)
(ERROR "Argument is incorrect type: ~s" STRING)))
(NCHARS NCHARS)
(DIR (MAKE-BYTEV 4))
(FONT_ASCENT (MAKE-BYTEV 4))
(FONT_DESCENT (MAKE-BYTEV 4))
(OVERALL (MAKE-BYTEV 12))
(RETURN-VALUE (BLOCK (XQUERYTEXTEXTENTS* DPY
FID
STRING
NCHARS
DIR
FONT_ASCENT
FONT_DESCENT
OVERALL)
'())))
(RETURN (MREF-INTEGER DIR 0)
(MREF-INTEGER FONT_ASCENT 0)
(MREF-INTEGER FONT_DESCENT 0)
(CONS 'XCHARSTRUCTP OVERALL))))
(DEFINE-FOREIGN XQUERYTEXTEXTENTS16*
("XQueryTextExtents16" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/EXTEND)
(IN REP/EXTEND)
(IN REP/EXTEND)
(IN REP/EXTEND))
IGNORE)
(DEFINE (XQUERYTEXTEXTENTS16 DPY FID STRING NCHARS)
(LET* ((DPY (CHK-DISPLAYP DPY))
(FID FID)
(STRING (CHK-XCHAR2BAP STRING))
(NCHARS NCHARS)
(DIR (MAKE-BYTEV 4))
(FONT_ASCENT (MAKE-BYTEV 4))
(FONT_DESCENT (MAKE-BYTEV 4))
(OVERALL (MAKE-BYTEV 12))
(RETURN-VALUE (BLOCK (XQUERYTEXTEXTENTS16* DPY
FID
STRING
NCHARS
DIR
FONT_ASCENT
FONT_DESCENT
OVERALL)
'())))
(RETURN (MREF-INTEGER DIR 0)
(MREF-INTEGER FONT_ASCENT 0)
(MREF-INTEGER FONT_DESCENT 0)
(CONS 'XCHARSTRUCTP OVERALL))))
(DEFINE-FOREIGN XDRAWTEXT*
("XDrawText" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XDRAWTEXT DPY D GC X Y ITEMS NITEMS)
(LET* ((DPY (CHK-DISPLAYP DPY))
(D D)
(GC (CHK-GC GC))
(X X)
(Y Y)
(ITEMS (CHK-XTEXTITEMAP ITEMS))
(NITEMS NITEMS)
(RETURN-VALUE (BLOCK (XDRAWTEXT* DPY D GC X Y ITEMS NITEMS)
'())))
RETURN-VALUE))
(DEFINE-FOREIGN XDRAWTEXT16*
("XDrawText16" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XDRAWTEXT16 DPY D GC X Y ITEMS NITEMS)
(LET* ((DPY (CHK-DISPLAYP DPY))
(D D)
(GC (CHK-GC GC))
(X X)
(Y Y)
(ITEMS (CHK-XTEXTITEM16P ITEMS))
(NITEMS NITEMS)
(RETURN-VALUE (BLOCK (XDRAWTEXT16* DPY D GC X Y ITEMS NITEMS)
'())))
RETURN-VALUE))
(DEFINE-FOREIGN XDRAWSTRING*
("XDrawString" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/STRING)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XDRAWSTRING DPY D GC X Y STRING LENGTH)
(LET* ((DPY (CHK-DISPLAYP DPY))
(D D)
(GC (CHK-GC GC))
(X X)
(Y Y)
(STRING (IF (STRING? STRING)
(STRING->ASCIZ! STRING)
(ERROR "Argument is incorrect type: ~s" STRING)))
(LENGTH LENGTH)
(RETURN-VALUE (BLOCK (XDRAWSTRING* DPY D GC X Y STRING LENGTH)
'())))
RETURN-VALUE))
(DEFINE-FOREIGN XDRAWSTRING16*
("XDrawString16" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XDRAWSTRING16 DPY D GC X Y STRING LENGTH)
(LET* ((DPY (CHK-DISPLAYP DPY))
(D D)
(GC (CHK-GC GC))
(X X)
(Y Y)
(STRING (CHK-XCHAR2BAP STRING))
(LENGTH LENGTH)
(RETURN-VALUE (BLOCK (XDRAWSTRING16* DPY D GC X Y STRING LENGTH)
'())))
RETURN-VALUE))
(DEFINE-FOREIGN XDRAWIMAGESTRING*
("XDrawImageString" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/STRING)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XDRAWIMAGESTRING DPY D GC X Y STRING LENGTH)
(LET* ((DPY (CHK-DISPLAYP DPY))
(D D)
(GC (CHK-GC GC))
(X X)
(Y Y)
(STRING (IF (STRING? STRING)
string
(ERROR "Argument is incorrect type: ~s" STRING)))
(LENGTH LENGTH)
(RETURN-VALUE (BLOCK (XDRAWIMAGESTRING* DPY
D
GC
X
Y
STRING
LENGTH)
'())))
RETURN-VALUE))
(DEFINE-FOREIGN XDRAWIMAGESTRING16*
("XDrawImageString16" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XDRAWIMAGESTRING16 DPY D GC X Y STRING LENGTH)
(LET* ((DPY (CHK-DISPLAYP DPY))
(D D)
(GC (CHK-GC GC))
(X X)
(Y Y)
(STRING (CHK-XCHAR2BAP STRING))
(LENGTH LENGTH)
(RETURN-VALUE (BLOCK (XDRAWIMAGESTRING16* DPY
D
GC
X
Y
STRING
LENGTH)
'())))
RETURN-VALUE))
(DEFINE-FOREIGN XPUTIMAGE*
("XPutImage" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XPUTIMAGE DPY
D
GC
IMAGE
REQ_XOFFSET
REQ_YOFFSET
X
Y
REQ_WIDTH
REQ_HEIGHT)
(LET* ((DPY (CHK-DISPLAYP DPY))
(D D)
(GC (CHK-GC GC))
(IMAGE (CHK-XIMAGEP IMAGE))
(REQ_XOFFSET REQ_XOFFSET)
(REQ_YOFFSET REQ_YOFFSET)
(X X)
(Y Y)
(REQ_WIDTH REQ_WIDTH)
(REQ_HEIGHT REQ_HEIGHT)
(RETURN-VALUE (BLOCK (XPUTIMAGE* DPY
D
GC
IMAGE
REQ_XOFFSET
REQ_YOFFSET
X
Y
REQ_WIDTH
REQ_HEIGHT)
'())))
RETURN-VALUE))
(DEFINE-FOREIGN XGETIMAGE*
("XGetImage" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER))
REP/C-POINTER)
(DEFINE (XGETIMAGE DPY D X Y WIDTH HEIGHT PLANE_MASK FORMAT)
(LET* ((DPY (CHK-DISPLAYP DPY))
(D D)
(X X)
(Y Y)
(WIDTH WIDTH)
(HEIGHT HEIGHT)
(PLANE_MASK PLANE_MASK)
(FORMAT FORMAT)
(RETURN-VALUE (CONS 'XIMAGEP
(XGETIMAGE* DPY
D
X
Y
WIDTH
HEIGHT
PLANE_MASK
FORMAT))))
RETURN-VALUE))
(DEFINE-FOREIGN XGETSUBIMAGE*
("XGetSubImage" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER))
REP/C-POINTER)
(DEFINE (XGETSUBIMAGE DPY
D
X
Y
WIDTH
HEIGHT
PLANE_MASK
FORMAT
DEST_IMAGE
DEST_X
DEST_Y)
(LET* ((DPY (CHK-DISPLAYP DPY))
(D D)
(X X)
(Y Y)
(WIDTH WIDTH)
(HEIGHT HEIGHT)
(PLANE_MASK PLANE_MASK)
(FORMAT FORMAT)
(DEST_IMAGE (CHK-XIMAGEP DEST_IMAGE))
(DEST_X DEST_X)
(DEST_Y DEST_Y)
(RETURN-VALUE (CONS 'XIMAGEP
(XGETSUBIMAGE* DPY
D
X
Y
WIDTH
HEIGHT
PLANE_MASK
FORMAT
DEST_IMAGE
DEST_X
DEST_Y))))
RETURN-VALUE))
(DEFINE-FOREIGN XCREATEFONTCURSOR*
("XCreateFontCursor" (IN REP/C-POINTER) (IN REP/INTEGER))
REP/INTEGER)
(DEFINE (XCREATEFONTCURSOR DPY WHICH)
(LET* ((DPY (CHK-DISPLAYP DPY))
(WHICH WHICH)
(RETURN-VALUE (XCREATEFONTCURSOR* DPY WHICH)))
RETURN-VALUE))
(DEFINE-FOREIGN XCREATEPIXMAPCURSOR*
("XCreatePixmapCursor" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER))
REP/INTEGER)
(DEFINE (XCREATEPIXMAPCURSOR DPY SOURCE MASK FOREGROUND BACKGROUND X Y)
(LET* ((DPY (CHK-DISPLAYP DPY))
(SOURCE SOURCE)
(MASK MASK)
(FOREGROUND (CHK-XCOLORP FOREGROUND))
(BACKGROUND (CHK-XCOLORP BACKGROUND))
(X X)
(Y Y)
(RETURN-VALUE (XCREATEPIXMAPCURSOR* DPY
SOURCE
MASK
FOREGROUND
BACKGROUND
X
Y)))
RETURN-VALUE))
(DEFINE-FOREIGN XCREATEGLYPHCURSOR*
("XCreateGlyphCursor" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/C-POINTER))
REP/INTEGER)
(DEFINE (XCREATEGLYPHCURSOR DPY
SOURCE_FONT
MASK_FONT
SOURCE_CHAR
MASK_CHAR
FOREGROUND
BACKGROUND)
(LET* ((DPY (CHK-DISPLAYP DPY))
(SOURCE_FONT SOURCE_FONT)
(MASK_FONT MASK_FONT)
(SOURCE_CHAR SOURCE_CHAR)
(MASK_CHAR MASK_CHAR)
(FOREGROUND (CHK-XCOLORP FOREGROUND))
(BACKGROUND (CHK-XCOLORP BACKGROUND))
(RETURN-VALUE (XCREATEGLYPHCURSOR* DPY
SOURCE_FONT
MASK_FONT
SOURCE_CHAR
MASK_CHAR
FOREGROUND
BACKGROUND)))
RETURN-VALUE))
(DEFINE-FOREIGN XRECOLORCURSOR*
("XRecolorCursor" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/C-POINTER)
(IN REP/C-POINTER))
IGNORE)
(DEFINE (XRECOLORCURSOR DPY CURSOR FOREGROUND BACKGROUND)
(LET* ((DPY (CHK-DISPLAYP DPY))
(CURSOR CURSOR)
(FOREGROUND (CHK-XCOLORP FOREGROUND))
(BACKGROUND (CHK-XCOLORP BACKGROUND))
(RETURN-VALUE (BLOCK (XRECOLORCURSOR* DPY
CURSOR
FOREGROUND
BACKGROUND)
'())))
RETURN-VALUE))
(DEFINE-FOREIGN XFREECURSOR*
("XFreeCursor" (IN REP/C-POINTER) (IN REP/INTEGER))
IGNORE)
(DEFINE (XFREECURSOR DPY CURSOR)
(LET* ((DPY (CHK-DISPLAYP DPY))
(CURSOR CURSOR)
(RETURN-VALUE (BLOCK (XFREECURSOR* DPY CURSOR) '())))
RETURN-VALUE))
(DEFINE-FOREIGN XQUERYBESTCURSOR*
("XQueryBestCursor" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/INTEGER)
(IN REP/EXTEND)
(IN REP/EXTEND))
REP/INTEGER)
(DEFINE (XQUERYBESTCURSOR DPY DRAWABLE WIDTH HEIGHT)
(LET* ((DPY (CHK-DISPLAYP DPY))
(DRAWABLE DRAWABLE)
(WIDTH WIDTH)
(HEIGHT HEIGHT)
(RET_WIDTH (MAKE-BYTEV 4))
(RET_HEIGHT (MAKE-BYTEV 4))
(RETURN-VALUE (XQUERYBESTCURSOR* DPY
DRAWABLE
WIDTH
HEIGHT
RET_WIDTH
RET_HEIGHT)))
(RETURN RETURN-VALUE
(MREF-INTEGER RET_WIDTH 0)
(MREF-INTEGER RET_HEIGHT 0))))
(DEFINE-FOREIGN XDEFINECURSOR*
("XDefineCursor" (IN REP/C-POINTER)
(IN REP/INTEGER)
(IN REP/INTEGER))
IGNORE)
(DEFINE (XDEFINECURSOR DPY W CURSOR)
(LET* ((DPY (CHK-DISPLAYP DPY))
(W W)
(CURSOR CURSOR)
(RETURN-VALUE (BLOCK (XDEFINECURSOR* DPY W CURSOR) '())))
RETURN-VALUE))
(DEFINE-FOREIGN XUNDEFINECURSOR*
("XUndefineCursor" (IN REP/C-POINTER) (IN REP/INTEGER))
IGNORE)
(DEFINE (XUNDEFINECURSOR DPY W)
(LET* ((DPY (CHK-DISPLAYP DPY))
(W W)
(RETURN-VALUE (BLOCK (XUNDEFINECURSOR* DPY W) '())))
RETURN-VALUE))